<?php
session_start();
include_once 'recursos/config.php';
$conf = new configuracion();
$dominio = $conf->getG2uDominio()."/";

if (is_array($_SESSION["g2uEventList"]) && count($_SESSION["g2uEventList"]) > 0 ){
    foreach ($_SESSION["g2uEventList"] as $key => $value) {
        
        $cadena_web = str_replace($conf->getCaracNo(), $conf->getCaracSi(), htmlspecialchars($value["name"]));
    ?>
    <div class="event_wrap" id="event_<?=$key?>" rel="<?=$cadena_web?>"> 
        <table>
            <tr>
                <td rowspan="4">
                    <img src="<?=$dominio?>images/png/calendario_evento.png" />
                </td>
                <td>
                    <?=htmlspecialchars($value["name"])?>
                </td>
            </tr>
            <tr>
                <td>
                    <font style="color: gray; font-size: 10pt;"><?=$value["date"]?></font>
                </td>
            </tr>
            <tr>
                <td>
                    <font style="color: gray; font-size: 10pt;">
                    <?
                    if($value["creator"]==$_SESSION["g2uId"]){
                        ?>
                        Creador
                        <?
                    } else {
                        ?>
                        Invitado
                        <?
                    }
                    ?>
                    </font>
                </td>
            </tr>
            <tr>
                <td>
                    <font style="color: gray; font-size: 10pt;"><?=$value["count"]?> Participantes</font>
                </td>
            </tr>
        </table>
    </div>
    <br/><br/>
    <?        
    }
} else {
    echo "Aun no tienes eventos creados...";
}
?>

